-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mergebase in pr checker #10586
Conversation
I think we also need a migration to fix the old PRs. |
Codecov Report
@@ Coverage Diff @@
## master #10586 +/- ##
==========================================
+ Coverage 43.71% 43.73% +0.01%
==========================================
Files 585 585
Lines 82026 82026
==========================================
+ Hits 35861 35876 +15
+ Misses 41725 41712 -13
+ Partials 4440 4438 -2
Continue to review full report at Codecov.
|
Hmm so on restart of Gitea all unmerged PRs should get their mergebase updated. The issue with merged ones will be that it'll be difficult to decide what it should be after it's merged. |
OK just doing some testing on my system this fix does appear to fix #10502 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow I was expecting a PR with 17 files and 300+ lines changed. 😅
Ping lgtm |
For migration: do we realy need one or just add this as option to the docktor? |
Fixing old merged PR could be another PR. |
Please send backport. 🙂 |
migrations/v128.go:79:fixMergeBase() [E] Unable to get merge base for PR ID 4314, Index 6 in ---/---. Error: exit status 128 - fatal: Not a valid object name fix-admin-2-master found some logs from gitea.com |
That means the base branch was deleted - so the merge base is impossible to recalculate. If the pr compare page was broken it will remain broken. |
Interestingly - and concerningly - viewing that PR gives me a 500. That entry will be skipped by the migration - therefore it's not that v128.go has broken this - but rather that we're not handling deleted base branches very well. |
During PR check we should update the merge-base if it changes.
Fix #10502